package top.infopub.mgr.bpa.service.impl;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.bpa.dao.ContractExtDetailDao;
import top.infopub.mgr.bpa.domain.ContractExtDetailAndSubDomain;
import top.infopub.model.bpa.ContractExtDetail;
import top.infopub.mgr.bpa.service.ContractExtDetailService;

@Service
public class ContractExtDetailServiceImpl extends GenericServiceImpl<ContractExtDetail, String> implements
		ContractExtDetailService {

	@Autowired
	private ContractExtDetailDao contractExtDetailDao;
	
	@Override
	public GenericDao<ContractExtDetail, String> getDao() {
		return contractExtDetailDao;
	}

    @Override
    public List<ContractExtDetail> selectByContractExtDetailId(String contractExtId) {
        return contractExtDetailDao.selectByContractExtDetailId(contractExtId);
    }

    @Override
    public List<ContractExtDetailAndSubDomain> selectDetailAndSub(String contractExtId,String feeType1,String feeType3,String feeSmallType1,String feeSmallType2,String levels) {
        return contractExtDetailDao.selectDetailAndSub(contractExtId,feeType1,feeType3,feeSmallType1,feeSmallType2,levels);
    }

    @Override
    public void insertByBatch(List<ContractExtDetail> contractExtDetails) {
        contractExtDetailDao.insertByBatch(contractExtDetails);
    }

    @Override
    public List<ContractExtDetailAndSubDomain> selectDetailAndSubDomain(String contractExtId) {
        return contractExtDetailDao.selectDetailAndSubDomain(contractExtId);
    }

    @Override
    public BigDecimal selectByDetailAmount(String extSubId) {
        return contractExtDetailDao.selectByDetailAmount(extSubId);
    }

    @Override
    public BigDecimal selectByDetailAmountSum(String contractExtId) {
        return contractExtDetailDao.selectByDetailAmountSum(contractExtId);
    }

}